uniqueFonts
PictInfo structure
#include <PictUtil.h>
typedef struct PictInfo { Size Offset Description
short version; 2 0 this is always zero, for now
long uniqueColors; 4 2 the number of actual colors in
the picture(s) /pixmap(s)
PaletteHandle thePalette; 4 6 handle to the palette information
CTabHandle theColorTable; 4 10 handle to the color table
Fixed hRes; 4 14 maximum horizontal resolution
for all the pixmaps
Fixed vRes; 4 18 maximum vertical resolution for
all the pixmaps
short depth; 2 22 maximum depth for all the
pixmaps (in the picture)
Rect sourceRect; 8 24 the picture frame rectangle (this
contains the entire picture)
long textCount; 4 28 total number of text strings in
the picture
long lineCount; 4 32 total number of lines in the
picture
long rectCount; 4 36 total number of rectangles in the
picture
long rRectCount; 4 40 total number of round rectangles
in the picture
long ovalCount; 4 44 total number of ovals in the
picture
long arcCount; 4 48 total number of arcs in the
picture
long polyCount; 4 52 total number of polygons in the
picture
long regionCount; 4 56 total number of regions in the
picture
long bitMapCount; 4 60 total number of bitmaps in the
picture
long pixMapCount; 4 64 total number of pixmaps in the
picture
long commentCount; 4 68 total number of comments in the
picture
long uniqueComments; 4 72 the number of unique comments
in the picture
CommentSpecHandle commentHandle;4 76 handle to all the comment
information
long uniqueFonts; 4 80 the number of unique fonts in the
picture
FontSpecHandle fontHandle; 4 84 handle to the FontSpec
information
Handle fontNamesHandle; 4 88 handle to the font names
long reserved1; 4 92
long reserved2; 4 96
} PictInfo; 104
typedef PictInfo *PictInfoPtr;
typedef PictInfo **PictInfoHandle;
Field descriptions
version Currently set to 0, this is the version number of the
Picture Utilities Package.
uniqueColors The number of colors in the collected pictures or pixel maps.
thePalette A handle to the resulting palette if you requested that colors be
returned in a palette. That palette contains either the number of
colors you requested to see, or, if there aren't that many, the
number found. On systems running the original QuickDraw, this
field is always returned as NIL.
theColorTable A handle to the resulting color table if you requested that
colors be returned in a color table. If there are fewer colors
found than you requested, the remaining places in your color
table are filled with black.
If a picture has more than 256 colors or has direct pixel maps
(16- or 32-bit pixel values), then the colors returned in the
color table are truncated internally to 16-bit direct RGB
values. In such a case the returned colors have a slight loss of
resolution, and the uniqueColors field reflects the number of
colors distinguishable at that resolution.
hRes The horizontal resolution of the last pixel map or picture
encountered. See the description of the sourceRect field.
vRes The vertical resolution of the last pixel map or picture
encountered. See the description of the sourceRect field. Note
that, although hRes and vRes are usually the same, they don't
have to be.
depth The deepest pixel depth of all pixel map records encountered.
sourceRect The sourceRect value from the version 2 picture header for
the last picture encountered. It contains the picture's rectangle
size at the resolution indicated by hRes and vRes. The top-left
corner of the rectangle is always (0,0).
Pictures created with the OpenCPicture function have the
hRes, vRes, and sourceRect fields built into their headers. Since
pictures following the older version 2 picture format created
by OpenPicture don't have this information, the hRes and vRes
fields are set to 72 pixels per inch, and the source rectangle is
calculated using the picture's picFrame field.
textCount The total number of text objects in all the pictures.
lineCount The total number of lines in all the pictures.
rectCount The total number of rectangles in all the pictures.
rRectCount The total number of round rectangles in all the pictures.
ovalCount The total number of ovals in all the pictures.
arcCount The total number of arcs in all the pictures.
polyCount The total number of polygons in all the pictures.
regionCount The total number of regions in all the pictures.
bitMapCount The total number of bitmaps in all the pictures.
pixMapCount The total number of pixel maps in all the pictures.
commentCount The total number of comments in all the pictures.
uniqueComments The number of comments (both long and short form)
encountered that have different IDs. This field is valid only if
you requested comment information.
commentHandle A handle to a list of comment specification records if you asked
for comment information.
uniqueFonts The number of different fonts encountered in the picture. This
field is valid only if you requested font information.
fontHandle A handle to a list of font specification records if you requested
font information.
fontNamesHandle A handle to a list of the names of the fonts in the picture. The
offset to a particular name is stored in the nameOffset field of
the font specification record for that font. This field is valid
only if you requested font information.